home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DBPCXL15.ARJ / SRC_C.ARJ / PCX1.C < prev    next >
Text File  |  1992-01-26  |  995b  |  37 lines

  1. #include <stdio.h>
  2. #include <io.h>
  3. #include <conio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <alloc.h>
  7. #include <mem.h>
  8. #include <dos.h>
  9. #include <errno.h>
  10.  
  11. #include "pcxlib.h"
  12. #include "vidlib.h"
  13.  
  14.  
  15. /*/////////////////////////////////////////////////////////////////////////
  16. // fread1PCX
  17. ///////////////////////////////////////////////////////////////////////////*/
  18. int   fread1PCX(char *d, unsigned dw, unsigned dl, unsigned dx, unsigned dy,
  19.                 unsigned x0, unsigned y0, unsigned x1, unsigned y1, PCXF *p)
  20. {
  21.     int h;
  22.     char *dest;
  23.  
  24.     if (pcxdebug) {
  25.        fprintf(pcxdebug,
  26.                "\nfread1PCX(%Fp, %u, %u,  %u, %u,  %u, %u,  %u, %u, %Fp",
  27.                d, dw, dl, dx, dy, x0, y0, x1, y1, p);
  28.     }
  29.     dest=(char *)normalize((char *)((long)d + (long)(dy*dw + dx)));
  30.     for (h=y0; h < y1+1; h++) {
  31.         _read_pcx_line( p, dest, x0, x1);
  32.         dest=(unsigned char *)normalize(dest + dw);
  33.     }
  34.     return(y1);
  35. }
  36.  
  37.